#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

namespace BYTEORDER_HTON_SEND {
	void test_01_send_A(int s, short x) {
		short u = x + 12;
		send(s, &u, sizeof u, 0); // <== error
	}

	void test_01_send_B(int s, short x) {
		short u = x + 12;
		short v = htons(u);
		send(s, &v, sizeof v, 0); // ok
	}
}